<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
		<link href="./images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
		<link href="./images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
		<link href="./images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
		<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
		<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
		<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.config.js?v={yun:}$config.cachecode{/yun}"></script>
		<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.all.min.js?v={yun:}$config.cachecode{/yun}"></script>
		<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet">
		<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
		<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
	
	</head>
	
	<body class="body_ifm">
	
		<div class="infoboxp">
			<div class="tabs_info">
			  	<ul>
				    <li class="curr"> <a href="index.php?m=admin_comrating" >套餐设置</a></li>
				    <li> <a href="index.php?m=admin_comrating&c=server" >增值服务</a> </li>
			  	</ul>
			</div>
			
			<div class="admin_new_tip">
				<a href="javascript:;" class="admin_new_tip_close"></a>
				<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
			  	<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
			  	<div class="admin_new_tip_list_cont">
			    	<div class="admin_new_tip_list">企业会员等级关乎您的收入问题，请谨慎添加和修改并注意整体的合理性。</div>
			  	</div>
			</div>
			
			<div class="clear"></div>
			
	  		<div class="tag_box mt10">
				<iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
				<form id="classform" class="layui-form" name="myform" target="supportiframe" action="index.php?m=admin_comrating&c=saveclass" method="post" id="myform" enctype="multipart/form-data">
				  	<input type="hidden" name="pytoken" id="pytoken" value="{yun:}$pytoken{/yun}">
				  	<input name="category" value="1" type="hidden"/>
	  				
	  				<table width="100%" class="table_form table_form_thr">
	  					<tr><td colspan="4" bgcolor="#f0f6fb"><div class="admin_bold">套餐设置</div></td></tr>
	   					<tr>
	   						<th width="160">会员模式：</th>
						   	<td colspan="3">
						      	<div class="layui-form-item">
						        	<div class="layui-input-inline">
						          		<input type="radio" name="type" value="1" title="套餐模式" {yun:}if $row.type==1{/yun}checked{yun:}/if{/yun} lay-filter="type">
						          		<input type="radio" name="type" value="2" title="时间模式" {yun:}if $row.type==2{/yun}checked{yun:}/if{/yun} lay-filter="type">
						        	</div>
									<span class="admin_web_tip">套餐模式针对下载简历等数量控制，时间模式在服务有效期内，不限数量，可以限制每日上限</span>
						      	</div>
						  	</td>
						</tr>
						
						<tr>
						 	<th>会员等级名称：</th>
						 	<td colspan="3">
						  		<input type="text" name="name" id="name" class="admin_comclass_add_text" size="30" value="{yun:}$row.name{/yun}">
						      	<input type="checkbox" name="youhui" value="1" {yun:}if $row.yh_price{/yun} checked {yun:}/if{/yun} title="优惠活动" lay-filter="youhui">
						 	</td>
						</tr>
						
					   	<tr class="admin_table_trbg vip_type_youhui" {yun:}if $row.yh_price<1{/yun}style="display:none;"{yun:}/if{/yun}>
					  		<th>设置优惠：</th>
					  		<td colspan="3">
					    		<div class="layui-form-item">
					      			<label class="layui-form-label">优惠后价格：</label>
					      			<div class="layui-input-inline">
					        			<input type="text" id="th_price" name="yh_price" style="width:80px" class="layui-input" value="{yun:}$row.yh_price{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9]/g,'')">
					      			</div>
					      			<div class="layui-form-mid layui-word-aux">元</div>
					      			<label class="layui-form-label">优惠日期：</label>
					      			<div class="layui-input-inline">
					        			<input type="text" id="time" name="time" style="width:180px" class="layui-input" value="{yun:}if $row.time_start && $row.time_end{/yun}{yun:}$row.time_start|date_format:'%Y-%m-%d'{/yun} ~ {yun:}$row.time_end|date_format:'%Y-%m-%d'{/yun} {yun:}/if{/yun}">
					      			</div>
					      			<label class="layui-form-label">赠送优惠券:</label>
					      			<div class="layui-input-inline">
										<select name="coupon" lay-filter="coupon">
											<option value="">请选择</option>
											{yun:}foreach from=$coupon item=v{/yun}
									        	<option value="{yun:}$v.id{/yun}" {yun:}if $row.coupon == $v.id{/yun} selected{yun:}/if{/yun}>{yun:}$v.name{/yun}</option>
											{yun:}/foreach{/yun}
										</select>
									</div>
								</div>
							</td>
					   	</tr>
	    
					  	<tr>
					  		<th>服务购买价格：</th>
					  		<td colspan="3">
						    	<div class="admin_comclass_addjg_box">
						      		<input type="text" name="service_price" id="service_price" class="admin_comclass_addjg" size="12" value="{yun:}$row.service_price{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9]/g,'')">
						      		<span class="admin_comclass_add_dw">元</span> 
						    	</div>
							</td>
					  	</tr>
					  	
	  					<tr>
	  						<th>服务有效时间：</th>
	  						<td colspan="3">
							    <div class="admin_comclass_add_right">
							     	<div class="admin_comclass_addjg_box">
							      		<input type="text" name="service_time" id="service_time" class="admin_comclass_addjg" size="12" value="{yun:}$row.service_time{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9.]/g,'')">
							      		<span class="admin_comclass_add_dw">天</span>
							     	</div> <!--<span class="admin_comclass_add_tip">( 提示：0 代表不限 )</span>-->
							    </div>
							</td>
	  					</tr>
	  					
						<tr>
							<th>排序：</th>
							<td colspan="3">
						    	<div class="admin_comclass_add_right">
						      		<input type="text" name="sort" id="sort" class="admin_comclass_add_text" size="12" value="{yun:}$row.sort{/yun}" onkeyup="this.value=this.value.replace(/[^0-9.]/g,'')">
						      		<span class="admin_web_tip">大前小后</span> 
						    	</div>
						    </td>
						</tr>
						
						<tr>
							<th>状态：</th>
							<td colspan="3">
							    <div class="admin_comclass_add_right">
							      	<div class="layui-form-item">
								        <div class="layui-input-inline">
								          	<input type="radio" name="display" value="1" title="启用" {yun:}if $row.display==1{/yun}checked{yun:}/if{/yun}>
								          	<input type="radio" name="display" value="0" title="不启用" {yun:}if $row.display==0{/yun}checked{yun:}/if{/yun}>
								        </div>
								        <span class="admin_web_tip">前台是否可见</span>
							      	</div>
							    </div>
							</td>
						</tr>
						
					  	<tr>
					  		<th>会员等级图标：</th>
					  		<td colspan="3">
						      	<div class="layui-form-item">
									<div class="layui-input-inline">
										<button type="button" class="yun_bth_pic adminupload" lay-data="{name: 'com_pic',imgid: 'imgicon',parentid: 'imgparent'}">上传图片</button>
										<input type="hidden" id="layupload_type" value="2"/>
										<input type="hidden" id="upload_path" value="compic"/>
										<input type="hidden" name="com_pic" value="{yun:}$row.com_pic{/yun}"/>
									</div>	
									<div id="imgparent" class="{yun:}if !$row.com_pic{/yun}none{yun:}/if{/yun}" layui-form-mid layui-word-aux>
										<img id="imgicon" src="{yun:}$config.sy_weburl{/yun}/{yun:}$row.com_pic{/yun}" width="28" height="28">
										{yun:}if $row.com_pic{/yun}
											<a href="javascript:void(0)" onclick="layer_del('确定要删除？', 'index.php?m=admin_comrating&c=delpic&id={yun:}$row.id{/yun}');" style="color:red;">删除图标</a>
										{yun:}/if{/yun}
									</div>
						      	</div>
					   		</td>
					  	</tr>
	
					   	<tr>
					   		<th>会员等级说明：</th>
					   		<td colspan="3">
					    		<div class="admin_comclass_add_right">
					      			<textarea name="explains" id="explain" rows="3" cols="50" class="admin_explain_textarea_w400">{yun:}$row.explains{/yun}</textarea>
					      			<span class="admin_web_tip">类别备注说明</span> 
					    		</div>
							</td>
					   	</tr>
					   	
						<tr>
							<th>赠送{yun:}$config.integral_pricename{/yun}：</th>
							<td colspan="3">
						    	<div class="admin_comclass_add_right">
						      		<input type="number" name="integral_buy" id="integral_buy" min="0" value="{yun:}$row.integral_buy{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9]/g,'')" class="admin_comclass_add_text">
						      		<span class="admin_web_tip">企业购买套餐赠送一定积分用于职位置顶、紧急招聘等服务 </span> 
						    	</div>
							</td>
						</tr>
						
	   					<tr>
	   						<th>增值服务折扣：</th>
	   						<td colspan="3">
						  		<div class="admin_comclass_addjg_box">    
						  			<input type="number" name="service_discount" id="service_discount" min="0" max="100" maxlength="3" value="{yun:}$row.service_discount{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9]/g,'')" class="admin_comclass_addjg">
						      		<span class="admin_comclass_add_dw">折</span>
						  		</div>
							</td>
	   					</tr>
	  
	   					<tr class="admin_comclass_add_list vip_type">
	     					<th>
	   							<div class=" vip_type_title_1" {yun:}if $row.type==2{/yun} style="display:none;" {yun:}/if{/yun} >设置套餐：</div>
	 							<div  class=" vip_type_title_2" {yun:}if $row.type!=2{/yun} style="display:none;"{yun:}/if{/yun}>
	 								<font color="red">限制时间会员每日最大操作次数：</font>
	 							</div>
	     					</th>
	    
	    					<td colspan="3">
						      	<ul class="admin_comclass_add_n">
							        <li> 
							        	<span class="admin_comclass_add_n_s">发布职位</span>
							          	<input type="text" name="job_num" id="job_num" class="admin_comclass_add_n_text" size="6" value="{yun:}$row.job_num{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9.]/g,'')">
							          	<span class="admin_comclass_add_n_dw">份</span>
							        </li>
							        <li> 
							        	<span class="admin_comclass_add_n_s">下载简历</span>
							         	<input type="text" name="resume" id="resume" class="admin_comclass_add_n_text" size="6" value="{yun:}$row.resume{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9.]/g,'')">							         
							        	<span class="admin_comclass_add_n_dw">份</span>
							        </li>
							        <li> 
							        	<span class="admin_comclass_add_n_s">邀请面试</span>
							          	<input type="text" name="interview" id="interview"  class="admin_comclass_add_n_text" size="6" value="{yun:}$row.interview{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9.]/g,'')">
							          	<span class="admin_comclass_add_n_dw">份</span>
							        </li>
						      	</ul>
 							 	<div>
							    	<ul class="admin_comclass_add_n">
							            <li> 
							            	<span class="admin_comclass_add_n_s">刷新职位</span>
							              	<input type="text" name="breakjob_num" id="breakjob_num" class="admin_comclass_add_n_text" size="6" value="{yun:}$row.breakjob_num{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9.]/g,'')">
							            	<span class="admin_comclass_add_n_dw">次</span> 
							            </li>
							            <li> 
							            	<span class="admin_comclass_add_n_s">发布兼职</span>
							              	<input type="text" name="part_num" id="part_num"  class="admin_comclass_add_n_text" size="6" value="{yun:}$row.part_num{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9.]/g,'')">
							              	<span class="admin_comclass_add_n_dw">份</span>
							            </li>
							            <li> 
							            	<span class="admin_comclass_add_n_s">刷新兼职</span>
							              	<input type="text" name="breakpart_num" id="breakpart_num" class="admin_comclass_add_n_text" size="6" value="{yun:}$row.breakpart_num{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9.]/g,'')">
							              	<span class="admin_comclass_add_n_dw">次</span>
							            </li>
							       	</ul>
						        </div>
						        <div >
						          	<ul class="admin_comclass_add_n">
						            	<li> 
						            		<span class="admin_comclass_add_n_s">发布猎头职位</span>
						              		<input type="text" name="lt_job_num" id="lt_job_num"  class="admin_comclass_add_n_text" size="6" value="{yun:}$row.lt_job_num{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9.]/g,'')">
						            		<span class="admin_comclass_add_n_dw">份</span>
						            	</li>
						            	<li> 
						            		<span class="admin_comclass_add_n_s">刷新猎头职位</span>
						              		<input type="text" name="lt_breakjob_num" id="lt_breakjob_num"  class="admin_comclass_add_n_text" size="6" value="{yun:}$row.lt_breakjob_num{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9.]/g,'')">
						             		<span class="admin_comclass_add_n_dw">次</span>
						            	</li>
						           	 	<li> 
						           	 		<span class="admin_comclass_add_n_s"> 下载高级简历</span>
						              		<input type="text" name="lt_resume" id="lt_resume"  class="admin_comclass_add_n_text" size="6" value="{yun:}$row.lt_resume{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9.]/g,'')">
						              		<span class="admin_comclass_add_n_dw">份</span>
						           	 	</li>
						          	</ul>
						        </div>
						        <div >
						          	<ul class="admin_comclass_add_n">
						      			<li class="com_com_a_list_s_w500">
						      				<span class="admin_comclass_add_n_s"> 招聘会报名</span>
						              		<input type="text" name="zph_num" id="zph_num"  class="admin_comclass_add_n_text" size="6" value="{yun:}$row.zph_num{/yun}" onKeyUp="this.value=this.value.replace(/[^0-9.]/g,'')">
						            		<span class="admin_comclass_add_n_dw">次</span>
						      			</li>
						           </ul>
						        </div>
	  						</td>
	   					</tr>
					  	<tr> 
					  		<th>&nbsp;</th>
					   		<td colspan="3">
					  			<input name="id" type="hidden" value="{yun:}$row.id{/yun}">
					  			<input class="layui-btn layui-btn-normal" type="button" onclick="checkform()" value="提交">  
					 		</td>
					  	</tr>
					</table>
	  			</form>  
			</div>
		</div>
	</body>
	<script type="text/javascript">
	    layui.use(['layer', 'form', 'laydate'], function() {
	        var layer = layui.layer,
	            form = layui.form,
	            laydate = layui.laydate,
	            $ = layui.$;
	
	        form.on('checkbox(youhui)', function(data) {
	            if(data.elem.checked) {
	                $(".vip_type_youhui").toggle();
	            } else {
	                $(".vip_type_youhui").toggle();
	            }
	        });
	
	        laydate.render({
	            elem: '#time',
	            range: '~'
	        });
	
	        form.on('radio(type)', function(data) {
	            if(data.elem.value == "1") {
	                $('.vip_type_title_1').show();
	                $('.vip_type_title_2').hide();
	            } else {
	                $('.vip_type_title_1').hide();
	                $('.vip_type_title_2').show();
	            }
	        });
	
	    });
	</script>
	<script>
	    var weburl = '{yun:}$config.sy_weburl{/yun}';
	
	    function checkform() {
	        if($("#name").val() == "") {
	            parent.layer.msg("等级名称不能为空！", 2, 8);
	            return false;
	        }
	        if($("#service_price").val() == "") {
	            parent.layer.msg("价格不能为空！", 2, 8);
	            return false;
	        }
	        if($("input[name='youhui']").attr("checked") == 'checked') {
	            if($("#yh_price").val() == '') {
	                parent.layer.msg("优惠价格不能为空！", 2, 8);
	                return false;
	            }
	            if($("#time").val() == '') {
	                parent.layer.msg("请选择优惠时间！", 2, 8);
	                return false;
	            }
	        }
	        $("#classform").submit();
	    }
	    $(".tips_class").hover(function() {
	        var msg_id = $(this).attr('id');
	        var msg = $('#' + msg_id + ' + font').html();
	        if($.trim(msg) != '') {
	            layer.tips(msg, this, {
	                guide: 1,
	                style: ['background-color:#5EA7DC; color:#fff;top:-7px', '#5EA7DC']
	            });
	            $(".xubox_layer").addClass("xubox_tips_border");
	        }
	    }, function() {
	        var msg_id = $(this).attr('id');
	        var msg = $('#' + msg_id + ' + font').html();
	        if($.trim(msg) != '') {
	            layer.closeAll('tips');
	        }
	    });
	</script>
	<script src="{yun:}$config.sy_weburl{/yun}/js/layui.upload.js?v={yun:}$config.cachecode{/yun}" type='text/javascript'></script> 
</html>